<template>
  <div>

      <el-container>
      <el-header>
               <p>{{username}}</p>   
      </el-header>
      <el-container>
        <el-aside width="200px">
          <Aside></Aside>
        </el-aside>
        <el-main>
            <!-- 二级路由坑 -->
           <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>

  </div>
</template>

<script>
import Aside from "@/views/Aside.vue"
export default {
  components:{Aside},
  data(){
    return {username:JSON.parse(localStorage.getItem("user")).username}
  },


}
</script>

<style>
.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: right;
    line-height: 60px;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: rgb(51, 51, 51);
    text-align: center;
    height: calc(100vh - 60px);  
    
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
  
  
  }
  
  body > .el-container {
    margin-bottom: 40px;
   
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>